package com.jzr.board.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.jzr.board.R
import com.jzr.board.bean.NurseListBean

class CategoryAdapter(data: MutableList<String>?) :
    BaseQuickAdapter<String, BaseViewHolder>(
        R.layout.item_category,
        data
    ) {

    override fun convert(
        helper: BaseViewHolder?,
        item:String?) {
    helper?.setText(R.id.tvName,item)
        helper?.itemView?.setOnClickListener{
            if(onItemClick!=null){
                onItemClick?.onListItemClick(item)
            }
        }
    }


    private var onItemClick: onListItemClick? = null

    interface onListItemClick {
        fun onListItemClick(item: String?)
    }

    fun onListItemClick(onListItemClick: onListItemClick?) {
        this.onItemClick = onListItemClick
    }


}